package com.qijian.maindata.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qijian.common.annotation.Excel;
import com.qijian.common.core.domain.BaseEntity;
import com.qijian.tool.domain.Storage;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.List;

/**
 * 工艺对象 main_line_process
 *
 * @author qijian
 * @date 2021-09-03
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString
@TableName("main_line_process")
public class LineProcess extends BaseEntity{
    private static final long serialVersionUID = 1L;

    /** ID */
    @TableId
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "ID")
    private Long processId;

    /** 线路ID */
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "线路ID")
    private Long lineId;

    /** 线路编码 */
    @ApiModelProperty(value = "线路编码")
    private String lineCode;

    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "工序ID")
    private Long pid;

    /** 工序编码 */
    @Excel(name = "工序编号",sort = 1)
    @ApiModelProperty(value = "工序编码")
    private String processCode;

    /** 工序名称 */
    @Excel(name = "工序",sort = 8)
    @ApiModelProperty(value = "工序名称")
    private String processName;

    /** 报工方式 */
    @ApiModelProperty(value = "报工方式")
    private String reportMode;

    /** 工序类型 */
    @ApiModelProperty(value = "工序类型")
    private String processType;

    @Excel(name = "工序类型",sort = 6)
    @ApiModelProperty(value = "工序类型名称")
    private String processTypeName;

    /** 待工工时 */
    @ApiModelProperty(value = "待工工时")
    private BigDecimal waitTime;

    /** 标准工时 */
    @ApiModelProperty(value = "标准工时")
    private BigDecimal workTime;

    /** 工价 */
    @Excel(name = "工价",sort = 10)
    @ApiModelProperty(value = "工价")
    private BigDecimal workCost;

    /** 检验标准 */
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "检验标准")
    private Long schemeId;

    @ApiModelProperty(value = "检验标准")
    private String schemeName;

    @ApiModelProperty(value = "工艺文件")
    private String processFile;

    /** 顺序 */
    @ApiModelProperty(value = "顺序")
    private Integer sort;

    /** 检验标准 */
    @Excel(name = "工艺要求")
    @ApiModelProperty(value = "工艺要求")
    private String remark;

    /** 编号 */
    @ApiModelProperty(value = "方案编号")
    private String code;
    /** 方案编号 */
    @ApiModelProperty(value = "方案编号")
    private String planCode;
    /** 方案体系 */
    @ApiModelProperty(value = "方案体系")
    private String planSystem;
    /** 是否默认方案 */
    @ApiModelProperty(value = "是否默认方案")
    private Boolean isDefault;

    @ApiModelProperty(value = "是否委外")
    private Boolean isOut;

    /** 检验标准 */
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "创建人")
    private Long createId;

    @ApiModelProperty(value = "切割单价")
    private BigDecimal cuttPrice;

    @ApiModelProperty("是否有检检方案")
    private Boolean isSchemeCheck;

    private BigDecimal proportion;

    @TableField(exist = false)
    private List<LineProcessWork> processWorkList;

    @TableField(exist = false)
    private List<LineProcessTime> processTimeList;

    @TableField(exist = false)
    private List<LineProcessItem> processItemList;

    @TableField(exist = false)
    private List<Storage> files;

    //检验方案
    @TableField(exist = false)
    private List<LineProcessScheme> processSchemeList;

}
